using System.Text;
using ICalendar.CalendarProperties;

namespace ICalendar.CalendarProperties
{
    public class AttendeeCollection : System.Collections.ObjectModel.Collection<Attendee>
    {
        public void AddRequired(string email)
        {
            this.Add(new Attendee(email) {Role = Role.Required});
        }

        public void AddOptional(string email)
        {
            this.Add(new Attendee(email) { Role = Role.Optional });
        }

        public AttendeeCollection FromString()
        {
            //ATTENDEE;
            return null;
        }
        public override string ToString()
        {
            var result = new StringBuilder();
            foreach (var item in this)
            {
                result.Append(item.ToString());
            }
            
            return result.ToString();
        }
    }
}